package top.go2do.auth.exception;

import top.go2do.common.exception.BusinessException;

import java.util.Map;

/**
 * @author xingyuji
 * @date 2025/3/18 06:38
 * @description
 */
public class AuthException extends BusinessException {
    private Map data;
    public AuthException(AuthErrorCode errorCode) {
        super(errorCode.getCode(), errorCode.getMsgKey());
    }

    public AuthException(AuthErrorCode errorCode, Object[] args) {
        super(errorCode.getCode(), errorCode.getMsgKey(), args);
    }

    public AuthException(AuthErrorCode errorCode, Object[] args, Throwable cause) {
        super(errorCode.getCode(), errorCode.getMsgKey(), args, cause);
    }

    public void setData(Map data) {
        this.data = data;
    }

    public Map getData() {
        return data;
    }
}
